blob: 37e6f53ea7164feed265da2788c530dc38ce60af (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
---
import Blog from "../../layouts/Blog.astro";
import { getCollection } from "astro:content";
export async function getStaticPaths() {
const blogEntries = await getCollection("blogs");
return blogEntries.map((entry) => ({
params: { slug: entry.slug },
props: { entry },
}));
}
const { entry } = Astro.props;
const { Content } = await entry.render();
---
<Blog title=`/home/kyren/blogs/${entry.slug}`>
<Content />
</Blog>
|